home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / crwdemo / global.bas < prev    next >
Encoding:
BASIC Source File  |  1994-10-03  |  17.6 KB  |  488 lines

  1. '
  2. '               Visual Basic Declarations of CRPE.DLL
  3. '               =====================================
  4. '
  5. '       File:         GLOBAL.BAS
  6. '
  7. '       Author:       Crystal Computer Services, Inc.
  8. '       Date:         15 Apr 92
  9. '
  10. '       Purpose:      This file presents the API to the Crystal Reports
  11. '                     Print Engine DLL.
  12. '
  13. '       Language:     Visual Basic for Windows
  14. '
  15. '       Copyright (c) 1992-1994 Crystal Services
  16. '
  17. '       Revisions:
  18. '
  19. '          CCS  15 Apr 92  -  Original Development
  20. '          KYL  12 Jul 92  -  Modified Existing Declarations
  21. '                             Added Missing Declarations
  22. '          KYL  27 Aug 92  -  Converted to CRPE.DLL
  23. '          CRD  08 Feb 93  -  Added new calls for 2.0 and Global declares for samples
  24. '          CRD  25 Feb 93  -  Added new calls for 2.0 Pro
  25. '          RBC  23 Apr 93  -  Added more new calls, rearranged to match CRPE.H
  26. '          DVA  22 Dec 93  -  Added new calls for 3.0
  27. '          TW   15 Mar 94  -  3.0 call reorganization
  28. '
  29. 'Mark's VB application specific Declarations
  30. '--------------------------------------------------------------------------------------------------
  31.  
  32. Declare Function GetWindow Lib "User" (ByVal hWnd As Integer, ByVal code As Integer) As Integer
  33. Declare Sub MoveWindow Lib "User" (ByVal hWnd As Integer, ByVal l As Integer, ByVal t As Integer, ByVal w As Integer, ByVal h As Integer, ByVal redraw As Integer)
  34. Global Const GW_CHILD = 5
  35. Global Const CASCADE = 0
  36. Global Const TILE_HORIZONTAL = 1
  37. Global Const TILE_VERTICAL = 2
  38. Global Const ARRANGE_ICONS = 3
  39. Global jobnum As Integer
  40. Global TableN As Integer
  41. Global SortN As Integer
  42. Global FormulaName As String
  43. Global SectionCode As Integer
  44. Global ScopeCode As Integer
  45. Global CRWFontName As String
  46. Global CRWFontSize As Integer
  47. Global CRWFontItalic As Integer
  48. Global CRWFontUnderLine As Integer
  49. Global CRWFontStrikeThru As Integer
  50. Global ErrorCode As Integer
  51. Global FieldType As Integer
  52. Global SortDir As Integer
  53. Global BoolCond1 As Integer
  54. Global DateCond1 As Integer
  55. Global GroupCondfield As String
  56.  
  57.  
  58. ' Open, print and close report (used when no changes needed to report)
  59. ' --------------------------------------------------------------------
  60.  
  61. Declare Function PEPrintReport Lib "CRPE.DLL" (ByVal RptName$, ByVal Printer%, ByVal Window%, ByVal Title$, ByVal Lft%, ByVal Top%, ByVal Wdth%, ByVal Height%, ByVal Style As Long, ByVal PWindow%) As Integer
  62.  
  63.  
  64. ' Open and close print engine
  65. ' ---------------------------
  66.  
  67. Declare Function PEOpenEngine Lib "CRPE.DLL" () As Integer
  68.  
  69. Declare Sub PECloseEngine Lib "CRPE.DLL" ()
  70.  
  71.  
  72. ' Get version info
  73. ' ----------------
  74.  
  75. Global Const PE_GV_DLL = 100      ' values for version parameter of PEGetVersion
  76. Global Const PE_GV_ENGINE = 200
  77.  
  78. Declare Function PEGetVersion Lib "CRPE.DLL" (ByVal version%) As Integer
  79.  
  80.  
  81. ' Open and close print job (i.e. report)
  82. ' --------------------------------------
  83.  
  84. Declare Function PEOpenPrintJob Lib "CRPE.DLL" (ByVal RptName$) As Integer
  85.  
  86. Declare Sub PEClosePrintJob Lib "CRPE.DLL" (ByVal PrintJob%)
  87.  
  88.  
  89. ' Start and cancel print job (i.e. print the report, usually after changing report)
  90. ' ---------------------------------------------------------------------------------
  91.  
  92. Declare Function PEStartPrintJob Lib "CRPE.DLL" (ByVal PrintJob%, ByVal WaitOrNot%) As Integer
  93.  
  94. Declare Sub PECancelPrintJob Lib "CRPE.DLL" (ByVal PrintJob%)
  95.  
  96.  
  97. ' Print job status
  98. ' ----------------
  99.  
  100. Declare Function PEIsPrintJobFinished Lib "CRPE.DLL" (ByVal PrintJob%) As Integer
  101.  
  102. Type PEJobInfo
  103.     StructSize As Integer  ' initialize to # of bytes in PEJobInfo
  104.  
  105.     NumRecordsRead As Long
  106.     NumRecordsSelected As Long
  107.     NumRecordsPrinted As Long
  108.  
  109.     DisplayPageN As Integer
  110.     LatestPageN As Integer
  111.     StartPageN As Integer
  112.  
  113.     PrintEnded As Integer
  114. End Type
  115.  
  116. Declare Function PEGetJobStatus Lib "CRPE.DLL" (ByVal PrintJob%, JobInfo As PEJobInfo) As Integer
  117.  
  118.  
  119. ' Print job error codes and messages
  120. ' ----------------------------------
  121.  
  122. Declare Function PEGetErrorCode Lib "CRPE.DLL" (ByVal PrintJob%) As Integer
  123.  
  124. Declare Function PEGetErrorText Lib "CRPE.DLL" (ByVal PrintJob%, TextHandle%, TextLength%) As Integer
  125.  
  126. Declare Function PEGetHandleString Lib "CRPE.DLL" (ByVal TextHandle%, ByVal Buffer$, ByVal BufferLength%) As Integer
  127.  
  128.  
  129. ' Setting the print date
  130. ' ----------------------
  131.  
  132. Declare Function PESetPrintDate Lib "CRPE.DLL" (ByVal PrintJob%, ByVal Date_Year%, ByVal Date_Month%, ByVal Date_Day%) As Integer
  133.  
  134.  
  135. ' Controlling formulas, selection formulas and group selection formulas
  136. ' ---------------------------------------------------------------------
  137.  
  138. Declare Function PEGetFormula Lib "CRPE.DLL" (ByVal PrintJob%, ByVal FormulaName$, TextHandle%, TextLength%) As Integer
  139.  
  140. Declare Function PESetFormula Lib "CRPE.DLL" (ByVal PrintJob%, ByVal FormulaName$, ByVal FormulaString$) As Integer
  141.  
  142. Declare Function PEGetSelectionFormula Lib "CRPE.DLL" (ByVal PrintJob%, TextHandle%, TextLength%) As Integer
  143.  
  144. Declare Function PESetSelectionFormula Lib "CRPE.DLL" (ByVal PrintJob%, ByVal FormulaString$) As Integer
  145.  
  146. Declare Function PEGetGroupSelectionFormula Lib "CRPE.DLL" (ByVal PrintJob%, TextHandle%, TextLength%) As Integer
  147.  
  148. Declare Function PESetGroupSelectionFormula Lib "CRPE.DLL" (ByVal PrintJob%, ByVal FormulaString$) As Integer
  149.  
  150.  
  151. ' Controlling group conditions (i.e. group breaks)
  152. ' ------------------------------------------------
  153.  
  154. Global Const PE_GC_ANYCHANGE = 0  ' values for the Condition parameter of PESetGroupCondition
  155.                            ' use PE_ANYCHANGE for all field types except Date and Boolean
  156.  
  157. Global Const PE_GC_DAILY = 0      ' use these constants for Date fields
  158. Global Const PE_GC_WEEKLY = 1
  159. Global Const PE_GC_BIWEEKLY = 2
  160. Global Const PE_GC_SEMIMONTHLY = 3
  161. Global Const PE_GC_MONTHLY = 4
  162. Global Const PE_GC_QUARTERLY = 5
  163. Global Const PE_GC_SEMIANNUALLY = 6
  164. Global Const PE_GC_ANNUALLY = 7
  165.  
  166. Global Const PE_GC_TOYES = 1      ' use these constants for Boolean fields
  167. Global Const PE_GC_TONO = 2
  168. Global Const PE_GC_EVERYYES = 3
  169. Global Const PE_GC_EVERYNO = 4
  170. Global Const PE_GC_NEXTISYES = 5
  171. Global Const PE_GC_NEXTISNO = 6
  172.  
  173. Declare Function PESetGroupCondition Lib "CRPE.DLL" (ByVal PrintJob%, ByVal SectionCode%, ByVal ConditionField$, ByVal Condition%, ByVal SortDirection%) As Integer
  174.  
  175.  
  176. ' Controlling sort order and group sort order
  177. ' -------------------------------------------
  178.  
  179. Global Const PE_SF_MAXNAMELEN = 50  ' maximum length of a sort field name
  180.  
  181. Global Const PE_SF_DESC = 0         ' values for the Direction parameter
  182. Global Const PE_SF_ASC = 1
  183.  
  184. Declare Function PEGetNSortFields Lib "CRPE.DLL" (ByVal PrintJob%) As Integer
  185.  
  186. Declare Function PEGetNthSortField Lib "CRPE.DLL" (ByVal PrintJob%, ByVal SortNumber%, NameHandle%, NameLength%, Direction%) As Integer
  187.  
  188. Declare Function PESetNthSortField Lib "CRPE.DLL" (ByVal PrintJob%, ByVal SortNumber%, ByVal SortFieldName$, ByVal Direction%) As Integer
  189.  
  190. Declare Function PEDeleteNthSortField Lib "CRPE.DLL" (ByVal PrintJob%, ByVal SortFieldN%) As Integer
  191.  
  192. Declare Function PEGetNGroupSortFields Lib "CRPE.DLL" (ByVal PrintJob%) As Integer
  193.  
  194. Declare Function PEGetNthGroupSortField Lib "CRPE.DLL" (ByVal PrintJob%, ByVal SortFieldN%, NameHandle%, NameLength%, Direction%) As Integer
  195.  
  196. Declare Function PESetNthGroupSortField Lib "CRPE.DLL" (ByVal PrintJob%, ByVal SortFieldN%, ByVal SortGroupName$, ByVal Direction%) As Integer
  197.  
  198. Declare Function PEDeleteNthGroupSortField Lib "CRPE.DLL" (ByVal PrintJob%, ByVal SortFieldN%) As Integer
  199.  
  200.  
  201. ' Controlling databases (see CRPE.H for more comments)
  202. ' ----------------------------------------------------
  203.  
  204. Declare Function PEGetNTables Lib "CRPE.DLL" (ByVal PrintJob%) As Integer
  205.  
  206. Global Const PE_DLL_NAME_LEN = 64
  207. Global Const PE_FULL_NAME_LEN = 256
  208.  
  209. Type PETableType
  210.     StructSize As Integer   ' initialize to # bytes in PETableType
  211.  
  212.     DLLName As String * PE_DLL_NAME_LEN
  213.     DescriptiveName  As String * PE_FULL_NAME_LEN
  214.  
  215.     DBType As Integer
  216. End Type
  217.  
  218. Global Const PE_DT_STANDARD = 1  ' values for DBType
  219. Global Const PE_DT_SQL = 2
  220.  
  221. Declare Function PEGetNthTableType Lib "CRPE.DLL" (ByVal PrintJob%, ByVal TableN%, TableType As PETableType) As Integer
  222.  
  223. Global Const PE_LONGPTR_LEN = 4
  224. Global Const PE_SESS_USERID_LEN = 128
  225. Global Const PE_SESS_PASSWORD_LEN = 128
  226.  
  227. Type PESessionInfo
  228.     StructSize As Integer   'initialize to # bytes in PESessionInfo
  229.  
  230.     UserID As String * PE_SESS_PASSWORD_LEN
  231.     Password As String * PE_SESS_PASSWORD_LEN
  232.  
  233.     SessionHandle As Long
  234. End Type
  235.  
  236. Declare Function PEGetNthTableSessionInfo Lib "CRPE.DLL" (ByVal PrintJob%, ByVal TableN%, SessionInfo As PESessionInfo) As Integer
  237.  
  238. Declare Function PESetNthTableSessionInfo Lib "CRPE.DLL" (ByVal PrintJob%, ByVal TableN%, SessionInfo As PESessionInfo, ByVal PropagateAcrossTables%) As Integer
  239.  
  240. Global Const PE_SERVERNAME_LEN = 128
  241. Global Const PE_DATABASENAME_LEN = 128
  242. Global Const PE_USERID_LEN = 128
  243. Global Const PE_PASSWORD_LEN = 128
  244.  
  245. Type PELogonInfo
  246.     StructSize As Integer   ' initialize to # bytes in PELogOnInfo
  247.  
  248.     ' For any of the following values an empty string ("") means to use
  249.     ' the value already set in the report.  To override a value in the
  250.     ' report use a non-empty string (e.g. "Server A").  All strings are
  251.     ' null-terminated.
  252.  
  253.     ' For Netware SQL, pass the dictionary path name in ServerName and
  254.     ' data path name in DatabaseName.
  255.  
  256.     ServerName As String * PE_SERVERNAME_LEN
  257.     DatabaseName  As String * PE_DATABASENAME_LEN
  258.     UserID As String * PE_USERID_LEN
  259.  
  260.     ' Password is undefined when getting information from report.
  261.  
  262.     Password  As String * PE_PASSWORD_LEN
  263. End Type
  264.  
  265. Declare Function PEGetNthTableLogonInfo Lib "CRPE.Dll" (ByVal PrintJob%, ByVal TableN%, LogOnInfo As PELogonInfo) As Integer
  266. Declare Function PESetNthTableLogonInfo Lib "CRPE.Dll" (ByVal PrintJob%, ByVal TableN%, LogOnInfo As PELogonInfo, ByVal Propagate%) As Integer
  267.  
  268. Global Const PE_TABLE_LOCATION_LEN = 256
  269.  
  270. Type PETableLocation
  271.     StructSize As Integer   ' initialize to # bytes in PETableLocation
  272.  
  273.     ' String is null-terminated.
  274.     Location  As String * PE_TABLE_LOCATION_LEN
  275. End Type
  276.  
  277. Declare Function PEGetNthTableLocation Lib "CRPE.Dll" (ByVal PrintJob%, ByVal TableN%, Location As PETableLocation) As Integer
  278. Declare Function PESetNthTableLocation Lib "CRPE.Dll" (ByVal PrintJob%, ByVal TableN%, Location As PETableLocation) As Integer
  279.  
  280. Declare Function PETestNthTableConnectivity Lib "CRPE.Dll" (ByVal PrintJob%, ByVal TableN%) As Integer
  281.  
  282. Declare Function PELogOnServer Lib "CRPE.Dll" (ByVal DLLName$, LogOnInfo As PELogonInfo) As Integer
  283. Declare Function PELogOFFServer Lib "CRPE.Dll" (ByVal DLLName$, LogOnInfo As PELogonInfo) As Integer
  284.  
  285. Declare Function PEGetNFiles Lib "CRPE.DLL" (ByVal PrintJob%) As Integer
  286. Declare Function PEGetNthFileName Lib "CRPE.DLL" (ByVal PrintJob%, ByVal FileN%, NameHandle%, NameLength%) As Integer
  287. Declare Function PESetNthFileName Lib "CRPE.DLL" (ByVal PrintJob%, ByVal FileN%, ByVal Set_Name$) As Integer
  288.  
  289.  
  290. ' Overriding SQL query in report
  291. ' ------------------------------
  292.  
  293. Declare Function PEGetSQLQuery Lib "CRPE.DLL" (ByVal PrintJob%, TextHandle%, TextLength%) As Integer
  294.  
  295. Declare Function PESetSQLQuery Lib "CRPE.DLL" (ByVal PrintJob%, ByVal QueryString$) As Integer
  296.  
  297.  
  298. ' Refreshing saved data
  299. ' ---------------------
  300.  
  301. Declare Function PESetRefreshData Lib "CRPE.DLL" (ByVal PrintJob%, ByVal RefreshData%) As Integer
  302.  
  303.  
  304. ' Report title
  305. ' ------------
  306.  
  307. Declare Function PEGetReportTitle Lib "CRPE.DLL" (ByVal PrintJob%, TitleHandle%, TitleLength%) As Integer
  308. Declare Function PESetReportTitle Lib "CRPE.DLL" (ByVal PrintJob%, ByVal Title$) As Integer
  309.  
  310.  
  311. ' Controlling printed pages
  312. ' -------------------------
  313.  
  314. Declare Function PEShowNextPage Lib "CRPE.DLL" (ByVal PrintJob%) As Integer
  315.  
  316. Declare Function PEShowFirstPage Lib "CRPE.DLL" (ByVal PrintJob%) As Integer
  317.  
  318. Declare Function PEShowPreviousPage Lib "CRPE.DLL" (ByVal PrintJob%) As Integer
  319.  
  320. Declare Function PEShowLastPage Lib "CRPE.DLL" (ByVal PrintJob%) As Integer
  321.  
  322. Declare Function PEShowPrintControls Lib "CRPE.DLL" (ByVal PrintJob%, ByVal ShowPrintControls%) As Integer
  323.  
  324.  
  325. ' Changing printer selection
  326. ' --------------------------
  327.  
  328. Declare Function PESelectPrinter Lib "CRPE.DLL" (ByVal PrintJob%, ByVal PrinterDriver$, ByVal PrinterName$, ByVal PortName$, ByVal DevMode As Long) As Integer
  329.  
  330.  
  331. ' Controlling print to printer
  332. ' ----------------------------
  333.  
  334. Declare Function PEOutputToDefaultPrinter Lib "CRPE.DLL" (ByVal PrintJob%, ByVal NCopies%) As Integer
  335.  
  336. Declare Function PEOutputToPrinter Lib "CRPE.DLL" (ByVal PrintJob%, ByVal NCopies%) As Integer
  337.  
  338. Declare Function PESetNDetailCopies Lib "CRPE.DLL" (ByVal PrintJob%, ByVal nDetailCopies%) As Integer
  339.  
  340. Global Const PE_MAXPAGEN = 65535
  341.  
  342. Type PEPrintOptions
  343.     StructSize As Integer   ' initialize to # bytes in PEPrintOptions
  344.  
  345.     ' page and copy numbers are 1-origin
  346.     ' use 0 to preserve the existing settings
  347.     StartPageN As Integer
  348.     stopPageN As Integer
  349.  
  350.     nReportCopies As Integer
  351.     collation As Integer
  352. End Type
  353.  
  354. ' values for collation
  355. Global Const PE_UNCOLLATED = 0
  356. Global Const PE_COLLATED = 1
  357. Global Const PE_DEFAULTCOLLATION = 2
  358.  
  359. Declare Function PESetPrintOptions Lib "CRPE.Dll" (ByVal PrintJob%, Options As PEPrintOptions) As Integer
  360.  
  361.  
  362. ' Controlling print to window
  363. ' ---------------------------
  364.  
  365. Declare Function PEOutPutToWindow Lib "CRPE.DLL" (ByVal PrintJob%, ByVal Title$, ByVal Lft%, ByVal Top%, ByVal Wdth%, ByVal Height%, ByVal Style As Long, ByVal PWindow%) As Integer
  366.  
  367. Declare Function PEGetWindowHandle Lib "CRPE.DLL" (ByVal PrintJob%) As Integer
  368.  
  369. Declare Function PEPrintWindow Lib "CRPE.Dll" (ByVal PrintJob%, ByVal WaitNoWait%) As Integer
  370.  
  371. Declare Sub PECloseWindow Lib "CRPE.DLL" (ByVal PrintJob%)
  372.  
  373.  
  374. ' Controlling print to file and export
  375. ' ------------------------------------
  376.  
  377. ' Types for the Options parameter of PEOutputToFile
  378. ' Use for all types except PE_FT_CHARSEPARATED
  379. Type PEPrintFileOptions
  380.     StructSize As Integer   ' initialize to # of bytes in PEPrintFileOptions
  381.  
  382.     UseReportNumberFmt As Integer
  383.     UseReportDateFormat As Integer
  384. End Type
  385.  
  386. Global Const PE_FIELDDELIMLEN = 17
  387.  
  388. ' Use for PE_FT_CHARSEPARATED
  389. Type PECharSepFileOptions
  390.     StructSize As Integer   ' initialize to # of bytes in PECharSepFileOptions
  391.  
  392.     UseReportNumberFmt As Integer
  393.     UseReportDateFormat As Integer
  394.     StringDelimiter As String * 1
  395.     FieldDelimiter As String * PE_FIELDDELIMLEN
  396. End Type
  397.  
  398. ' values for FileType
  399. Global Const PE_FT_RECORD = 0
  400. Global Const PE_FT_TABSEPARATED = 1
  401. Global Const PE_FT_TEXT = 2
  402. Global Const PE_FT_DIF = 3
  403. Global Const PE_FT_CSV = 4
  404. Global Const PE_FT_CHARSEPARATED = 5
  405. Global Const PE_FT_TABFORMATTED = 6
  406.  
  407. Declare Function PEOutputToFile Lib "CRPE.DLL" (ByVal PrintJob%, ByVal OutputFilePath$, ByVal FileType%, Options As Any) As Integer
  408.  
  409. Type PEExportOptions
  410.     StructSize As Integer   'initialize to # bytes in PEExportOptions
  411.  
  412.     FormatDLLName As String * PE_DLL_NAME_LEN
  413.     FormatType As Long
  414.     FormatOptions As Long
  415.     DestinationDLLName As String * PE_DLL_NAME_LEN
  416.     DestinationType As Long
  417.     DestinationOptions As Long
  418.     NFormatOptionsBytes As Integer
  419.     NDestinationOptionsBytes As Integer
  420. End Type
  421.  
  422. Declare Function PEGetExportOptions Lib "CRPE.DLL" (ByVal PrintJob%, ExportOptions As PEExportOptions) As Integer
  423.  
  424. Declare Function PEExportTo Lib "CRPE.DLL" (ByVal PrintJob%, ExportOptions As PEExportOptions) As Integer
  425.  
  426.  
  427. ' Setting page margins
  428. ' --------------------
  429.  
  430. Declare Function PESetMargins Lib "CRPE.DLL" (ByVal PrintJob%, ByVal LeftMargin%, ByVal RightMargin%, ByVal TopMargin%, ByVal BottomMargin%) As Integer
  431.  
  432.  
  433. ' Setting section height and format
  434. ' ---------------------------------
  435.  
  436. ' values for SectionCode parameter
  437. Global Const PE_ALLSECTIONS = 0
  438. Global Const PE_HEADERSECTION = 2000
  439. Global Const PE_GROUPHEADER = 3000       ' outer group header is 3000, next is 3001, etc.
  440. Global Const PE_DETAILSECTION = 4000
  441. Global Const PE_GROUPFOOTER = 5000       ' outer group footer is 5000, next is 5001, etc.
  442. Global Const PE_GRANDTOTALSECTION = 6000
  443. Global Const PE_FOOTERSECTION = 7000
  444.  
  445. ' MinimumHeight is in twips - 1440 twips to the inch
  446. Declare Function PESetMinimumSectionHeight Lib "CRPE.DLL" (ByVal PrintJob%, ByVal SectionCode%, ByVal MinimumHeight%) As Integer
  447.  
  448. Type PESectionOptions
  449.     StructSize As Integer   ' initialize to # bytes in PESectionOptions
  450.  
  451.     ' use 0 to turn off, 1 to turn on and -1 to preserve each attribute
  452.     Visible As Integer
  453.     NewPageBefore As Integer
  454.     NewPageAfter As Integer
  455.     KeepTogether As Integer
  456.     SuppressBlankLines As Integer
  457.     ResetPageNAfter As Integer
  458.     PrintAtBottomOfPage As Integer
  459. End Type
  460.  
  461. Declare Function PESetSectionFormat Lib "CRPE.DLL" (ByVal PrintJob%, ByVal SectionCode%, Options As PESectionOptions) As Integer
  462.  
  463.  
  464. ' Setting line height
  465. ' -------------------
  466.  
  467. ' use PE_ALLLINES to set the height of all lines in a section
  468. Global Const PE_ALLLINES = -1
  469.  
  470. ' Height and Ascent are in twips
  471. Declare Function PESetLineHeight Lib "CRPE.DLL" (ByVal PrintJob%, ByVal SectionCode%, ByVal LineN%, ByVal Height%, ByVal Ascent%) As Integer
  472.  
  473.  
  474. ' Setting font info
  475. ' -----------------
  476.  
  477. ' values for ScopeCode - may be ORed together
  478. Global Const PE_FIELDS = 1
  479. Global Const PE_TEXT = 2
  480.  
  481. ' use for isItalic, isUnderlined, or isStruckOut to preserve the existing value
  482. Global Const PE_UNCHANGED = -1
  483.  
  484. Declare Function PESetFont Lib "CRPE.DLL" (ByVal PrintJob%, ByVal SectionCode%, ByVal ScopeCode%, ByVal FaceName$, ByVal FontFamily%, ByVal FontPitch%, ByVal CharSet%, ByVal PointSize%, ByVal isItalic%, ByVal isUnderlined%, ByVal isStruckOut%, ByVal Weight%) As Integer
  485.  
  486. ' End Of Declarations
  487.  
  488.